package Chapter7;
import java.util.*;
public class Example03 {
	public static void main(String[] args) {
		ArrayList list=new ArrayList();
		list.add("data1");
		list.add("data2");
		list.add("data3");
		list.add("data4");
		Iterator it=list.iterator();
		while(it.hasNext()) {
			Object obj=it.next();
			System.out.println(obj);
		}
	}

}
